import React from 'react'
import './index.less'

function AmePopup(props) {
  const onClickMask = () => {
    props.AmePopupClose && props.AmePopupClose(false)
  }

  return (
    <div className={`ameng-popup ${props?.visible ? 'show' : 'hidden'}`}>
      <div className="ameng-mask" onClick={onClickMask} />
      <div className="ameng-popup-body">{props.children}</div>
    </div>
  )
}

export default AmePopup
